package com.gitee.wsl.ext.any

/**
 * @Description:
 * @Author: JIULANG
 * @Data: 2022/10/27 12:16
 */


val NULL_VALUE: ValueBox = ValueBox("NULL_VALUE")

class ValueBox(val symbol: String) {
    override fun toString(): String = "<$symbol>"

    @Suppress("UNCHECKED_CAST", "NOTHING_TO_INLINE")
    inline fun <T> unbox(value: Any?): T = if (value === this) null as T else value as T
}